home *** CD-ROM | disk | FTP | other *** search
/ Deutsche Edition 1 / Deutsche Edition 1.iso / amok / 081-090 / amok82 / plot / source / plotzeichnen.mod < prev    next >
Encoding:
Modula Implementation  |  1993-11-04  |  28.3 KB  |  896 lines

  1. (***********************************************************************
  2.  
  3.    :Program.    PlotZeichnen.mod
  4.    :Author.     Stefan Köhle
  5.    :Address.    Erhardtstr. 10
  6.                 W-7033 Herrenberg
  7.    :Phone.      07032/5146
  8.    :shortcut.
  9.    :Version.    1.0
  10.    :Date.       23.11.92
  11.    :Copyright.  nix
  12.    :Language.   Modula-II.
  13.    :Translator. M2Amiga 4.107d
  14.    :Imports.    Plotinit, MyMathLib 
  15.    :UpDate.
  16.    :Contents.
  17.    :Remark.
  18.  
  19. **********************************************************************)
  20.  
  21. IMPLEMENTATION MODULE PlotZeichnen;
  22.  
  23.  
  24. FROM PlotInit    IMPORT PlotBasePtr,WelcheTaste ;
  25. FROM MyMathLib   IMPORT IntToReal,RealToInt,IntToFFP,FFPToInt,FFPToStr ;
  26.  
  27. FROM SYSTEM      IMPORT BITSET,ADR,ADDRESS,FFP,LONGSET ;
  28. FROM GraphicsL   IMPORT AreaMove,AreaDraw,AreaEnd,Text,
  29.                         SetAPen,SetDrMd,RectFill,Move,Draw ;
  30. FROM String      IMPORT Length,CopyPart;
  31. IMPORT GfxMacros ;
  32. IMPORT GraphicsD ;
  33. IMPORT GraphicsL ;
  34. IMPORT IntuitionD ;
  35. IMPORT IntuitionL ;
  36. IMPORT ExecL ;
  37.  
  38. CONST BitMapWidth = 1720 ;
  39.       BitMapHeight = 1351 ;
  40.  
  41.  
  42.  
  43.  
  44. PROCEDURE RasterZeichnen(VAR Pb: PlotBasePtr) ;   (************************)
  45.  
  46.  VAR j: INTEGER ;
  47.  
  48.  BEGIN
  49.  
  50.    SetAPen(Pb^.Rp,1) ;                             (* Vordergrundfarbe *)
  51.    GfxMacros.SetDrPt(Pb^.Rp,0CCCCH) ;                        (* gestrichelt *)
  52.  
  53.    IF Pb^.GrosseBitmap THEN
  54.       FOR j := 1 TO 11 DO                          (* links senkrecht *)
  55.          IF (Pb^.Achsen AND (j*36-432 = -Pb^.A.YNull)) THEN
  56.             GfxMacros.SetDrPt(Pb^.Rp,0FFFFH) ;          (* durchgezogen *)
  57.          ELSE
  58.             GfxMacros.SetDrPt(Pb^.Rp,0CCCCH) ;          (* gestrichelt *)
  59.          END ;
  60.          Move(Pb^.Rp,Pb^.KastenX0-432+j*36,Pb^.KastenY0+432-j*36) ;
  61.          Draw(Pb^.Rp,Pb^.KastenX0-432+j*36,Pb^.KastenY0+1152-j*36) ;
  62.       END (* FOR *) ;
  63.  
  64.       FOR j := 1 TO 15  DO                         (* hinten senkrecht *)
  65.          IF (Pb^.Achsen AND (j*72 = Pb^.A.XNull)) THEN
  66.             GfxMacros.SetDrPt(Pb^.Rp,0FFFFH) ;          (* durchgezogen *)
  67.          ELSE
  68.             GfxMacros.SetDrPt(Pb^.Rp,0CCCCH) ;          (* gestrichelt *)
  69.          END ;
  70.          Move(Pb^.Rp,Pb^.KastenX0+j*72,Pb^.KastenY0);
  71.          Draw(Pb^.Rp,Pb^.KastenX0+j*72,Pb^.KastenY0+720);
  72.       END (* FOR *) ;
  73.  
  74.       FOR j := 1 TO 15  DO                        (* waagrecht *)
  75.          IF (Pb^.Achsen AND (j*45 = Pb^.A.ZNull)) THEN
  76.             GfxMacros.SetDrPt(Pb^.Rp,0FFFFH) ;          (* durchgezogen *)
  77.             Move(Pb^.Rp,Pb^.KastenX0-432,Pb^.KastenY0+432+j*45) ;
  78.             Draw(Pb^.Rp,Pb^.KastenX0,Pb^.KastenY0+j*45) ;
  79.             Draw(Pb^.Rp,Pb^.KastenX0+800,Pb^.KastenY0+j*45) ;
  80.             Draw(Pb^.Rp,Pb^.KastenX0+1152,Pb^.KastenY0+j*45) ;
  81.          ELSE
  82.             GfxMacros.SetDrPt(Pb^.Rp,0AAAAH) ;        (* fein gestrichelt *)
  83.             Move(Pb^.Rp,Pb^.KastenX0-432,Pb^.KastenY0+432+j*45) ;
  84.             Draw(Pb^.Rp,Pb^.KastenX0,Pb^.KastenY0+j*45) ;
  85.             GfxMacros.SetDrPt(Pb^.Rp,0CCCCH) ;        (* gestrichelt *)
  86.             Draw(Pb^.Rp,Pb^.KastenX0+800,Pb^.KastenY0+j*45) ;
  87.             Draw(Pb^.Rp,Pb^.KastenX0+1152,Pb^.KastenY0+j*45) ;
  88.          END ;
  89.       END (* FOR *) ;
  90.    ELSE
  91.  
  92.       FOR j := 0 TO 6 DO                      (* hinten senkrecht *)
  93.  
  94.          IF (Pb^.Achsen AND (j*48+48 = Pb^.A.XNull)) THEN
  95.             GfxMacros.SetDrPt(Pb^.Rp,0FFFFH) ;          (* durchgezogen *)
  96.          ELSE
  97.             GfxMacros.SetDrPt(Pb^.Rp,0CCCCH) ;          (* gestrichelt *)
  98.          END ;
  99.  
  100.          Move(Pb^.Rp,Pb^.KastenX0+48+j*48,Pb^.KastenY0);
  101.          Draw(Pb^.Rp,Pb^.KastenX0+48+j*48,Pb^.KastenY0+240) ;
  102.       END (* FOR *) ;
  103.  
  104.       FOR j := 0 TO 6 DO             (* hinten u. links waagrecht *)
  105.  
  106.          IF (Pb^.Achsen AND (30+j*30 = Pb^.A.ZNull)) THEN
  107.             GfxMacros.SetDrPt(Pb^.Rp,0FFFFH) ;          (* durchgezogen *)
  108.             Move(Pb^.Rp,Pb^.KastenX0-144,Pb^.KastenY0+174+j*30);
  109.             Draw(Pb^.Rp,Pb^.KastenX0,Pb^.KastenY0+30+j*30) ;
  110.             Draw(Pb^.Rp,Pb^.KastenX0+384,Pb^.KastenY0+30+j*30) ;
  111.          ELSE
  112.             GfxMacros.SetDrPt(Pb^.Rp,0AAAAH) ;        (* fein gestrichelt *)
  113.             Move(Pb^.Rp,Pb^.KastenX0-144,Pb^.KastenY0+174+j*30);
  114.             Draw(Pb^.Rp,Pb^.KastenX0,Pb^.KastenY0+30+j*30) ;
  115.             GfxMacros.SetDrPt(Pb^.Rp,0CCCCH) ;        (* gestrichelt *)
  116.             Draw(Pb^.Rp,Pb^.KastenX0+384,Pb^.KastenY0+30+j*30) ;
  117.          END ;
  118.       END (* FOR *) ;
  119.  
  120.  
  121.       FOR j := 0 TO 4 DO             (* links senkrecht *)
  122.  
  123.          IF (Pb^.Achsen AND (j*24-120 = -Pb^.A.YNull)) THEN
  124.             GfxMacros.SetDrPt(Pb^.Rp,0FFFFH) ;          (* durchgezogen *)
  125.          ELSE
  126.             GfxMacros.SetDrPt(Pb^.Rp,0CCCCH) ;          (* gestrichelt *)
  127.          END ;
  128.          Move(Pb^.Rp,Pb^.KastenX0-120+j*24,Pb^.KastenY0+120-j*24);
  129.          Draw(Pb^.Rp,Pb^.KastenX0-120+j*24,Pb^.KastenY0+360-j*24) ;
  130.       END (* FOR *) ;
  131.    END (* IF *) ;
  132.    GfxMacros.SetDrPt(Pb^.Rp,0FFFFH) ;
  133.  
  134. END RasterZeichnen ;
  135.  
  136.  
  137.  
  138. PROCEDURE RestRaster(VAR Pb: PlotBasePtr) ;  (*****************************)
  139.  
  140.  VAR x,y,x1,y1,xLinks,xRechts,xGanzRechts,yGanzRechts,yUnten,
  141.      step,Schnittpunkt,YWertmin,P1x,RasterStep:  INTEGER ;
  142.      X1,X2,Y1,Y2,j: INTEGER ;
  143.      OK: BOOLEAN ;
  144.  
  145.  BEGIN
  146.  
  147.    SetAPen(Pb^.Rp,1) ;                             (* Vordergrundfarbe *)
  148.  
  149.    IF Pb^.GrosseBitmap THEN
  150.       P1x := 432 ; RasterStep := 45 ;
  151.       xLinks := Pb^.KastenX0-432 ; xRechts := Pb^.KastenX0+720 ;
  152.       yUnten := Pb^.KastenY0+1152; step := 18 ; YWertmin := Pb^.KastenY0+720 ;
  153.       xGanzRechts := Pb^.KastenX0+1152 ; yGanzRechts := Pb^.KastenY0+720 ;
  154.    ELSE
  155.       P1x := 144 ; RasterStep := 30 ;
  156.       xLinks := Pb^.KastenX0-144 ; xRechts := Pb^.KastenX0+240 ;
  157.       yUnten := Pb^.KastenY0+384 ; step := 12 ; YWertmin := Pb^.KastenY0+240 ;
  158.       xGanzRechts := Pb^.KastenX0+384 ; yGanzRechts := Pb^.KastenY0+240 ;
  159.    END ;
  160.  
  161.    IF Pb^.Flaeche THEN
  162.       y := Pb^.ymax ;
  163.       x := Pb^.Schritt ;
  164.  
  165.       WHILE x <= Pb^.xmax DO                         (* vorne rum *)
  166.          SetAPen(Pb^.Rp,0) ;          (* Hintergrundfarbe *)
  167.  
  168.          OK := AreaMove(Pb^.Rp,Pb^.Wert[x-Pb^.Schritt,y].XWert+1,yUnten-1);
  169.  
  170.          OK := AreaDraw(Pb^.Rp,Pb^.Wert[x,y].XWert,yUnten-1) ;
  171.  
  172.          OK := AreaDraw(Pb^.Rp,Pb^.Wert[x,y].XWert,Pb^.Wert[x,y].YWert);
  173.  
  174.          OK := AreaDraw(Pb^.Rp,Pb^.Wert[x-Pb^.Schritt,y].XWert+1,
  175.                         Pb^.Wert[x-Pb^.Schritt,y].YWert) ;
  176.  
  177.          OK := AreaEnd(Pb^.Rp) ;
  178.  
  179.          SetAPen(Pb^.Rp,1) ;          (* Vordergrundfarbe *)
  180.          GfxMacros.SetDrPt(Pb^.Rp,0FFFFH) ;     (* durchgezogen *)
  181.  
  182.  
  183.          Move(Pb^.Rp,Pb^.Wert[x-Pb^.Schritt,y].XWert,
  184.                      Pb^.Wert[x-Pb^.Schritt,y].YWert);
  185.          Draw(Pb^.Rp,Pb^.Wert[x,y].XWert,
  186.                      Pb^.Wert[x,y].YWert) ;
  187.          x := x+Pb^.Schritt ;
  188.       END (* WHILE *) ;
  189.  
  190.  
  191.       x := Pb^.xmax ;
  192.       y := Pb^.Schritt ;
  193.  
  194.       WHILE y <= Pb^.ymax DO           (* rechts rum *)
  195.          SetAPen(Pb^.Rp,0) ;
  196.          OK := AreaMove(Pb^.Rp,Pb^.Wert[x,y-Pb^.Schritt].XWert-1,
  197.                         YWertmin+2*(y-Pb^.Schritt)) ;
  198.          OK := AreaDraw(Pb^.Rp,Pb^.Wert[x,y-Pb^.Schritt].XWert-1,
  199.                         Pb^.Wert[x,y-Pb^.Schritt].YWert);
  200.          OK := AreaDraw(Pb^.Rp,Pb^.Wert[x,y].XWert,
  201.                         Pb^.Wert[x,y].YWert) ;
  202.          OK := AreaDraw(Pb^.Rp,Pb^.Wert[x,y].XWert,
  203.                         YWertmin+2*y) ;
  204.          OK := AreaEnd(Pb^.Rp) ;
  205.          SetAPen(Pb^.Rp,1) ;
  206.  
  207.          Move(Pb^.Rp,Pb^.Wert[x,y].XWert,Pb^.Wert[x,y].YWert);
  208.          Draw(Pb^.Rp,Pb^.Wert[x,y-Pb^.Schritt].XWert,
  209.               Pb^.Wert[x,y-Pb^.Schritt].YWert);
  210.          Move(Pb^.Rp,Pb^.Wert[x,y-Pb^.Schritt].XWert,
  211.               YWertmin+2*(y-Pb^.Schritt)) ;
  212.          Draw(Pb^.Rp,Pb^.Wert[x,y].XWert,YWertmin+2*y) ;
  213.  
  214.           y := y+Pb^.Schritt ;
  215.        END (* WHILE *) ;
  216.  
  217.    END (* IF Flaeche *) ;
  218.  
  219.    Move(Pb^.Rp,xRechts,yUnten) ;           (* senkrechte Linie rechts unten *)
  220.    Draw(Pb^.Rp,xRechts,Pb^.Wert[Pb^.xmax,Pb^.ymax].YWert) ;
  221.  
  222.  
  223.    GfxMacros.SetDrPt(Pb^.Rp,0CCCCH) ;                (* gestrichelt *)
  224.  
  225.  
  226.    j := step ;
  227.    WHILE j <= Pb^.xmax DO                  (* vorne senkrecht *)
  228.  
  229.       IF (Pb^.Achsen AND (xLinks+4*j = Pb^.KastenX0-P1x+Pb^.A.XNull)) THEN
  230.          GfxMacros.SetDrPt(Pb^.Rp,0FFFFH) ;          (* durchgezogen *)
  231.       ELSE
  232.          GfxMacros.SetDrPt(Pb^.Rp,0CCCCH) ;          (* gestrichelt *)
  233.       END ;
  234.       Move(Pb^.Rp,xLinks+4*j,yUnten) ;
  235.       Draw(Pb^.Rp,xLinks+4*j,Pb^.Wert[j,Pb^.ymax].YWert) ;
  236.       j := j+step ;
  237.    END ;
  238.  
  239.  
  240.    j := step ;
  241.    WHILE j <= Pb^.ymax DO
  242.       IF (Pb^.Achsen AND (yGanzRechts+2*j = Pb^.A.YNull+YWertmin)) THEN
  243.          GfxMacros.SetDrPt(Pb^.Rp,0FFFFH) ;          (* durchgezogen *)
  244.       ELSE
  245.          GfxMacros.SetDrPt(Pb^.Rp,0CCCCH) ;          (* gestrichelt *)
  246.       END ;
  247.       Move(Pb^.Rp,xGanzRechts-2*j,yGanzRechts+2*j) ;    (* rechts senkrecht *)
  248.       Draw(Pb^.Rp,xGanzRechts-2*j,Pb^.Wert[Pb^.xmax,j].YWert) ;
  249.       j := j+step ;
  250.    END ;
  251.  
  252.  
  253.    y1 := yUnten ;
  254.  
  255.    WHILE y1 >= Pb^.KastenY0 DO                    (* vorne waagrecht *)
  256.  
  257.       y1 := y1-RasterStep ;
  258.       Move(Pb^.Rp,xLinks,y1) ;
  259.  
  260.       IF (Pb^.Achsen AND (y1 = Pb^.KastenY0+Pb^.A.ZNull+P1x)) THEN
  261.          GfxMacros.SetDrPt(Pb^.Rp,0FFFFH) ;          (* durchgezogen *)
  262.       ELSE
  263.          GfxMacros.SetDrPt(Pb^.Rp,0CCCCH) ;          (* gestrichelt *)
  264.       END ;
  265.  
  266.       x := 0 ;
  267.       WHILE x <= Pb^.xmax DO
  268.  
  269.  
  270.          IF Pb^.Wert[x,Pb^.ymax].YWert <= y1 THEN     (* Funktion drueber *)
  271.  
  272.             Draw(Pb^.Rp,xLinks+4*x,y1) ;
  273.             IF Pb^.Wert[x+Pb^.Schritt,Pb^.ymax].YWert > y1 THEN
  274.                                                         (* Wechsel nach unten *)
  275.  
  276.                Schnittpunkt := xLinks+4*x+(y1-Pb^.Wert[x,Pb^.ymax].YWert)*
  277.                                4*Pb^.Schritt/(Pb^.Wert[x+Pb^.Schritt,
  278.                                Pb^.ymax].YWert-Pb^.Wert[x,Pb^.ymax].YWert);
  279.  
  280.                Draw(Pb^.Rp,Schnittpunkt,y1) ;
  281.  
  282.             ELSE                                        (* immer noch drueber *)
  283.  
  284.                Draw(Pb^.Rp,xLinks+4*x,y1) ;
  285.  
  286.             END ;
  287.  
  288.          ELSE                                           (* Funktion drunter *)
  289.  
  290.             Move(Pb^.Rp,xLinks+4*x,y1) ;
  291.  
  292.             IF Pb^.Wert[x+Pb^.Schritt,Pb^.ymax].YWert <= y1 THEN
  293.                                                         (* Wechsel nach oben *)
  294.                Schnittpunkt := xLinks+4*x+(y1-Pb^.Wert[x,Pb^.ymax].YWert)*
  295.                                4*Pb^.Schritt/(Pb^.Wert[x+Pb^.Schritt,
  296.                                Pb^.ymax].YWert-Pb^.Wert[x,Pb^.ymax].YWert);
  297.  
  298.                Move(Pb^.Rp,Schnittpunkt,y1) ;
  299.  
  300.             ELSE                                        (* immer noch drunter *)
  301.                Move(Pb^.Rp,xLinks+4*x,y1) ;
  302.             END ;
  303.  
  304.          END ;         x := x+Pb^.Schritt ;
  305.  
  306.       END (* WHILE *) ;
  307.  
  308.    END (* WHILE y1 *) ;
  309.  
  310.                                                           (* vorne rechts *)
  311.  
  312.    y1 := yUnten ;
  313.  
  314.    WHILE y1 >= Pb^.KastenY0+P1x+RasterStep DO
  315.       y1 := y1 - RasterStep ;
  316.  
  317.       Move(Pb^.Rp,xRechts,y1) ;
  318.  
  319.       IF (Pb^.Achsen AND (y1 = Pb^.KastenY0+yUnten-YWertmin+Pb^.A.ZNull)) THEN
  320.          GfxMacros.SetDrPt(Pb^.Rp,0FFFFH) ;          (* durchgezogen *)
  321.       ELSE
  322.          GfxMacros.SetDrPt(Pb^.Rp,0AAAAH) ;          (* fein gestrichelt *)
  323.       END ;
  324.  
  325.       y := Pb^.ymax ; x := Pb^.xmax ;
  326.       WHILE y > 0 DO
  327.  
  328.          X1 := xRechts+2*(Pb^.ymax-y) ;
  329.          X2 := xRechts+2*(Pb^.ymax-(y-Pb^.Schritt)) ;
  330.          Y1 := Pb^.Wert[Pb^.xmax,y].YWert+2*(Pb^.ymax-y) ;
  331.          Y2 := Pb^.Wert[Pb^.xmax,y-Pb^.Schritt].YWert
  332.                + 2*(Pb^.ymax-(y-Pb^.Schritt)) ;
  333.  
  334.                                                        (*Funktion drueber *)
  335.          IF Pb^.Wert[x,y].YWert <= y1-2*(Pb^.ymax-y) THEN
  336.  
  337.  
  338.             IF Pb^.Wert[x,y-Pb^.Schritt].YWert >     (* Wechsel nach unten *)
  339.                y1-2*(Pb^.ymax-y)-2*Pb^.Schritt THEN
  340.  
  341.                Schnittpunkt := X1+(y1-Y1)*(X2-X1)/(Y2-Y1) ;
  342.  
  343.                Draw(Pb^.Rp,Schnittpunkt,y1+xRechts-Schnittpunkt) ;
  344.  
  345.  
  346.             ELSE                                        (* immer noch drueber *)
  347.  
  348.                Draw(Pb^.Rp,xRechts+2*Pb^.Schritt+2*(Pb^.ymax-y),
  349.                     y1-2*Pb^.Schritt-2*(Pb^.ymax-y)) ;
  350.  
  351.             END ;
  352.  
  353.          ELSE                                           (* Funktion drunter *)
  354.  
  355.             IF Pb^.Wert[x,y-Pb^.Schritt].YWert <
  356.                y1-2*(Pb^.ymax-y)-2*Pb^.Schritt THEN
  357.                                                         (* Wechsel nach oben *)
  358.                Schnittpunkt := X1+(y1-Y1)*(X2-X1)/(Y2-Y1) ;
  359.                Move(Pb^.Rp,Schnittpunkt,y1+xRechts-Schnittpunkt) ;
  360.  
  361.             ELSE                                        (* immer noch drunter *)
  362.                Move(Pb^.Rp,xRechts+2*Pb^.Schritt+2*(Pb^.ymax-y),
  363.                     y1-2*Pb^.Schritt-2*(Pb^.ymax-y)) ;
  364.  
  365.             END ;
  366.  
  367.          END ;
  368.  
  369.          y := y-Pb^.Schritt ;
  370.  
  371.       END (* WHILE *) ;
  372.  
  373.    END (* WHILE y1 *) ;
  374.  
  375.    GfxMacros.SetDrPt(Pb^.Rp,0FFFFH) ;        (* durchgezogen *)
  376.  
  377. END RestRaster ;
  378.  
  379.  
  380.  
  381. PROCEDURE BeschriftungZeichnen(VAR Pb: PlotBasePtr) ;  (*******************)
  382.  
  383.  VAR j: INTEGER ;
  384.      l: FFP ;
  385.      str        :  ARRAY[0..10] OF CHAR ;
  386.  
  387.  BEGIN
  388.  
  389.    SetAPen(Pb^.Rp,1) ;                             (* Vordergrundfarbe *)
  390.  
  391.    IF NOT Pb^.GrosseBitmap THEN
  392.  
  393.  
  394.       FOR j := 0 TO 4 DO                       (* grosse Knubbel x-Achse *)
  395.          Move(Pb^.Rp,Pb^.KastenX0-144+j*96,Pb^.KastenY0+384) ;
  396.          Draw(Pb^.Rp,Pb^.KastenX0-144+j*96,Pb^.KastenY0+384+6) ;
  397.       END (* FOR *) ;
  398.       FOR j := 0 TO 3 DO                       (* kleine Knubbel x-Achse *)
  399.          Move(Pb^.Rp,Pb^.KastenX0-96+j*96,Pb^.KastenY0+384) ;
  400.          Draw(Pb^.Rp,Pb^.KastenX0-96+j*96,Pb^.KastenY0+384+3) ;
  401.       END (* FOR *) ;
  402.  
  403.  
  404.       FOR j := 0 TO 3 DO                       (* grosse Knubbel y-Achse *)
  405.          Move(Pb^.Rp,Pb^.KastenX0+384-j*48,Pb^.KastenY0+240+j*48) ;
  406.          Draw(Pb^.Rp,Pb^.KastenX0+384+6-j*48,Pb^.KastenY0+240+j*48) ;
  407.       END (* FOR *) ;
  408.  
  409.       FOR j := 0 TO 2 DO                       (* kleine Knubbel y-Achse *)
  410.          Move(Pb^.Rp,Pb^.KastenX0+360-j*48,Pb^.KastenY0+240+24+j*48) ;
  411.          Draw(Pb^.Rp,Pb^.KastenX0+360+3-j*48,Pb^.KastenY0+240+24+j*48) ;
  412.       END (* FOR *) ;
  413.  
  414.  
  415.       FOR j := 0 TO 8 BY 2 DO                  (* grosse Knubbel z-Achse *)
  416.          Move(Pb^.Rp,Pb^.KastenX0+384,Pb^.KastenY0+j*30) ;
  417.          Draw(Pb^.Rp,Pb^.KastenX0+384+6,Pb^.KastenY0+j*30) ;
  418.       END ;
  419.  
  420.       FOR j := 1 TO 7 BY 2 DO                  (* kleine Knubbel z-Achse *)
  421.          Move(Pb^.Rp,Pb^.KastenX0+384,Pb^.KastenY0+j*30) ;
  422.          Draw(Pb^.Rp,Pb^.KastenX0+384+3,Pb^.KastenY0+j*30) ;
  423.       END ;
  424.  
  425.       l := Pb^.B.XLinks ;                         (* Text x-Achse *)
  426.       Move(Pb^.Rp,Pb^.KastenX0-150,Pb^.KastenY0+408+5) ;
  427.       FFPToStr(l,str) ;
  428.       Text(Pb^.Rp,ADR(str),Length(str)) ;
  429.  
  430.       FOR j := 1 TO 4 DO
  431.          l := Pb^.B.XLinks+ IntToFFP(j)*Pb^.B.DeltaX ;
  432.          Move(Pb^.Rp,Pb^.KastenX0-170+j*96,Pb^.KastenY0+408+5) ;
  433.          FFPToStr(l,str) ;
  434.          Text(Pb^.Rp,ADR(str),Length(str)) ;
  435.       END ;
  436.  
  437.  
  438.       Move(Pb^.Rp,Pb^.KastenX0+404,Pb^.KastenY0+251) ;     (* Text y-Achse *)
  439.       FFPToStr(Pb^.B.YHinten,str) ;
  440.       Text(Pb^.Rp,ADR(str),Length(str)) ;
  441.  
  442.       FOR j := 1 TO 3 DO
  443.          Move(Pb^.Rp,Pb^.KastenX0+407-j*48,Pb^.KastenY0+243+j*48) ;
  444.          l := Pb^.B.YHinten+ IntToFFP(j)*Pb^.B.DeltaY ;
  445.          FFPToStr(l,str) ;
  446.          Text(Pb^.Rp,ADR(str),Length(str)) ;
  447.       END ;
  448.  
  449.  
  450.       Move(Pb^.Rp,Pb^.KastenX0+407,Pb^.KastenY0+238) ;      (* Text z-Achse *)
  451.       l := Pb^.B.ZOben-4.0*Pb^.B.DeltaZ ;
  452.       FFPToStr(l,str) ;
  453.       Text(Pb^.Rp,ADR(str),Length(str)) ;
  454.  
  455.       FOR j := 3 TO 0 BY -1 DO
  456.          Move(Pb^.Rp,Pb^.KastenX0+407,Pb^.KastenY0+3+60*j) ;
  457.          l := Pb^.B.ZOben- IntToFFP(j)*Pb^.B.DeltaZ ;
  458.          FFPToStr(l,str) ;
  459.          Text(Pb^.Rp,ADR(str),Length(str)) ;
  460.       END ;
  461.  
  462.    ELSE
  463.  
  464.       FOR j := 0 TO 8 DO                           (* Knubbel x-Achse *)
  465.          Move(Pb^.Rp,Pb^.KastenX0-432+j*144,Pb^.KastenY0+1152) ;   (* grosse *)
  466.          Draw(Pb^.Rp,Pb^.KastenX0-432+j*144,Pb^.KastenY0+1160) ;
  467.       END (* FOR *) ;
  468.       FOR j := 0 TO 7 DO
  469.          Move(Pb^.Rp,Pb^.KastenX0-432+72+j*144,Pb^.KastenY0+1152) ; (* kleine *)
  470.          Draw(Pb^.Rp,Pb^.KastenX0-432+72+j*144,Pb^.KastenY0+1156) ;
  471.       END (* FOR *) ;
  472.       FOR j := 0 TO 6 DO                            (* Knubbel y-Achse *)
  473.          Move(Pb^.Rp,Pb^.KastenX0+1152-j*72,Pb^.KastenY0+720+j*72) ;(* grosse *)
  474.          Draw(Pb^.Rp,Pb^.KastenX0+1160-j*72,Pb^.KastenY0+720+j*72) ;
  475.       END (* FOR *) ;
  476.       FOR j := 0 TO 5 DO                                            (* kleine *)
  477.          Move(Pb^.Rp,Pb^.KastenX0+1152-36-j*72,Pb^.KastenY0+720+36+j*72) ;
  478.          Draw(Pb^.Rp,Pb^.KastenX0+1156-36-j*72,Pb^.KastenY0+720+36+j*72) ;
  479.       END (* FOR *) ;
  480.  
  481.       FOR j := 0 TO 8 DO                  (* Knubbel z-Achse *)
  482.          Move(Pb^.Rp,Pb^.KastenX0+1152,Pb^.KastenY0+j*90) ;    (* grosse *)
  483.          Draw(Pb^.Rp,Pb^.KastenX0+1160,Pb^.KastenY0+j*90) ;
  484.       END (* FOR *) ;
  485.       FOR j := 0 TO 7 DO
  486.          Move(Pb^.Rp,Pb^.KastenX0+1152,Pb^.KastenY0+45+j*90) ; (* kleine *)
  487.          Draw(Pb^.Rp,Pb^.KastenX0+1156,Pb^.KastenY0+45+j*90) ;
  488.       END (* FOR *) ;
  489.  
  490.  
  491.       l := Pb^.B.XLinks ;                         (* Text x-Achse *)
  492.       Move(Pb^.Rp,Pb^.KastenX0-452,Pb^.KastenY0+1180+10) ;
  493.       FFPToStr(l,str) ;
  494.       Text(Pb^.Rp,ADR(str),Length(str)) ;
  495.  
  496.       FOR j := 1 TO 8 DO
  497.          l := Pb^.B.XLinks+ IntToFFP(j)*Pb^.B.DeltaX*0.5 ;
  498.          Move(Pb^.Rp,Pb^.KastenX0-462+j*144,Pb^.KastenY0+1180+10) ;
  499.          FFPToStr(l,str) ;
  500.          Text(Pb^.Rp,ADR(str),Length(str)) ;
  501.       END ;
  502.  
  503.       Move(Pb^.Rp,Pb^.KastenX0+1152+35,Pb^.KastenY0+733) ;   (* Text y-Achse *)
  504.       FFPToStr(Pb^.B.YHinten,str) ;
  505.       Text(Pb^.Rp,ADR(str),Length(str)) ;
  506.  
  507.       FOR j := 1 TO 6 DO
  508.          Move(Pb^.Rp,Pb^.KastenX0+1152+37-j*72,Pb^.KastenY0+720+3+j*72) ;
  509.          l := Pb^.B.YHinten+ IntToFFP(j)*Pb^.B.DeltaY*0.5 ;
  510.          FFPToStr(l,str) ;
  511.          Text(Pb^.Rp,ADR(str),Length(str)) ;
  512.       END ;
  513.  
  514.    END (* IF *) ;
  515.  
  516.       Move(Pb^.Rp,Pb^.KastenX0+1152+50,Pb^.KastenY0+710) ;   (* Text z-Achse *)
  517.       l := Pb^.B.ZOben-4.0*Pb^.B.DeltaZ ;
  518.       FFPToStr(l,str) ;
  519.       Text(Pb^.Rp,ADR(str),Length(str)) ;
  520.  
  521.       FOR j := 7 TO 0 BY -1 DO
  522.          Move(Pb^.Rp,Pb^.KastenX0+1152+50,Pb^.KastenY0+4+90*j) ;
  523.          l := Pb^.B.ZOben- 0.5*IntToFFP(j)*Pb^.B.DeltaZ ;
  524.          FFPToStr(l,str) ;
  525.          Text(Pb^.Rp,ADR(str),Length(str)) ;
  526.       END ;
  527.  
  528.  
  529. END BeschriftungZeichnen ;
  530.  
  531.  
  532.  
  533.  
  534. PROCEDURE ClearBitMap(VAR Pb: PlotBasePtr) ; (************************************)
  535.  
  536.   BEGIN
  537.  
  538.    SetAPen(Pb^.Screen^.firstWindow^.rPort,0) ;
  539.  
  540.    IF Pb^.GrosseBitmap THEN
  541.       RectFill(Pb^.Screen^.firstWindow^.rPort,0,0,800,800) ;
  542.       RectFill(Pb^.Screen^.firstWindow^.rPort,800,0,BitMapWidth,800) ;
  543.  
  544.       RectFill(Pb^.Screen^.firstWindow^.rPort,0,800,800,BitMapHeight) ;
  545.       RectFill(Pb^.Screen^.firstWindow^.rPort,800,800,BitMapWidth,BitMapHeight) ;
  546.    ELSE
  547.       RectFill(Pb^.Screen^.firstWindow^.rPort,0,0,Pb^.ScreenWidth,
  548.                Pb^.ScreenHeight) ;
  549.    END (* IF *) ;
  550.  
  551.    SetAPen(Pb^.Screen^.firstWindow^.rPort,1) ;
  552.  
  553. END ClearBitMap ;
  554.  
  555.  
  556.  
  557. PROCEDURE FunktionReinSchreiben(VAR Pb: PlotBasePtr; clear: BOOLEAN) ;
  558.  
  559.  VAR String1,String2: ARRAY[0..10] OF CHAR ;
  560.      String3: ARRAY[0..70] OF CHAR ;
  561.  
  562.  BEGIN
  563.  
  564.    SetAPen(Pb^.Rp,0) ;                             (* Hintergrundfarbe *)
  565.  
  566.    String1 := 'f(x,y)' ;
  567.    String2 := '=' ;
  568.  
  569.  
  570.    IF clear THEN
  571.       IF Pb^.GrosseBitmap THEN
  572.          RectFill(Pb^.Rp,25,30,800,40) ;
  573.          RectFill(Pb^.Rp,800,30,BitMapWidth,40) ;
  574.       ELSE
  575.          RectFill(Pb^.Rp,25,10,630,20) ;
  576.       END ;
  577.       SetAPen(Pb^.Rp,1) ;                          (* Vordergrundfarbe *)
  578.    ELSE
  579.       IF Pb^.GrosseBitmap THEN
  580.          RectFill(Pb^.Rp,25,30,800,40) ;
  581.          RectFill(Pb^.Rp,800,30,BitMapWidth,40) ;
  582.          SetAPen(Pb^.Rp,1) ;                       (* Vordergrundfarbe *)
  583.          Move(Pb^.Rp,25,38) ;
  584.          Text(Pb^.Rp,ADR(String1),Length(String1)) ;
  585.          Move(Pb^.Rp,80,38) ;
  586.          Text(Pb^.Rp,ADR(String2),Length(String2)) ;
  587.          Move(Pb^.Rp,98,38) ;
  588.          Text(Pb^.Rp,ADR(Pb^.Funktion),Length(Pb^.Funktion)) ;
  589.       ELSE
  590.          RectFill(Pb^.Rp,25,10,630,20) ;
  591.          SetAPen(Pb^.Rp,1) ;                       (* Vordergrundfarbe *)
  592.          Move(Pb^.Rp,25,18) ;
  593.          Text(Pb^.Rp,ADR(String1),Length(String1)) ;
  594.          Move(Pb^.Rp,80,18) ;
  595.          Text(Pb^.Rp,ADR(String2),Length(String2)) ;
  596.          Move(Pb^.Rp,98,18) ;
  597.          IF Length(Pb^.Funktion) > 67 THEN
  598.             CopyPart(String3,Pb^.Funktion,0,67) ;
  599.             Text(Pb^.Rp,ADR(String3),Length(String3)) ;
  600.          ELSE
  601.             Text(Pb^.Rp,ADR(Pb^.Funktion),Length(Pb^.Funktion)) ;
  602.          END ;
  603.       END ;
  604.    END ;
  605.  
  606.  
  607. END FunktionReinSchreiben ;
  608.  
  609.  
  610.  
  611. PROCEDURE HelpFenster(VAR Pb: PlotBasePtr): BOOLEAN ;
  612.  
  613.  
  614.    TYPE String  = ARRAY [0..5] OF CHAR ;
  615.         Texte   = ARRAY [0..10] OF String ;
  616.         String1 = ARRAY [0..50] OF CHAR ;
  617.         Texte1  = ARRAY [0..5] OF String1 ;
  618.  
  619.    VAR  Str      : Texte ;
  620.         Str1     : Texte1 ;
  621.         i,j,x,y  : INTEGER ;
  622.         class    : IntuitionD.IDCMPFlagSet ;
  623.         IntuiMsg : POINTER TO IntuitionD.IntuiMessage ;
  624.         Window1  : IntuitionD.NewWindow ;
  625.         Window2Ptr: IntuitionD.WindowPtr ;
  626.         Rp       : GraphicsD.RastPortPtr ;
  627.         code     : CARDINAL ;
  628.  
  629.  
  630.  
  631.    PROCEDURE OpenWindow(): BOOLEAN ;
  632.  
  633.  
  634.       VAR
  635.          i : CARDINAL ;
  636.  
  637.       BEGIN
  638.  
  639.          WITH Window1 DO
  640.             leftEdge := 20 ; topEdge := 40 ;
  641.             width := 601 ; height := 451 ;
  642.             detailPen := 0 ;
  643.             blockPen := 1 ;
  644.             idcmpFlags := IntuitionD.IDCMPFlagSet{IntuitionD.rawKey} ;
  645.             flags := IntuitionD.WindowFlagSet{IntuitionD.noCareRefresh,
  646.                                               IntuitionD.simpleRefresh,
  647.                                               IntuitionD.borderless,
  648.                                               IntuitionD.activate} ;
  649.             firstGadget := NIL ;
  650.             checkMark := NIL ;
  651.             title := NIL ;
  652.             screen := Pb^.Screen ;
  653.             bitMap := NIL ;
  654.             minWidth := 601 ; maxWidth := 601 ;
  655.             minHeight := 301 ; maxHeight := 301 ;
  656.             type := IntuitionD.ScreenFlagSet{IntuitionD.publicScreen} ;
  657.          END (* WITH *) ;
  658.  
  659.          Window2Ptr := IntuitionL.OpenWindow(Window1) ;
  660.          IF Window2Ptr = NIL THEN
  661.              RETURN FALSE ;
  662.          END ;
  663.  
  664.          Rp := Window2Ptr^.rPort ;
  665.  
  666.          RETURN TRUE ;
  667.  
  668.    END OpenWindow ;
  669.  
  670.  
  671.  
  672.    PROCEDURE DrawButton(x,y,t:INTEGER; big: BOOLEAN) ;
  673.  
  674.       VAR d: INTEGER ;
  675.  
  676.      BEGIN
  677.  
  678.         SetAPen(Rp,1) ;          (* Vordergrundfarbe *)
  679.  
  680.         IF big THEN d := 30 ;
  681.         ELSE d := 16 ;
  682.         END ;
  683.         Move(Rp,x+3,y+26) ;
  684.         Draw(Rp,x,y+23) ;
  685.         Draw(Rp,x,y+3) ;
  686.         Draw(Rp,x+3,y) ;
  687.         Draw(Rp,x+d+7,y) ;
  688.         Draw(Rp,x+d+10,y+3) ;
  689.         Draw(Rp,x+d+10,y+19) ;
  690.         Move(Rp,x+7,y+21) ;
  691.         Draw(Rp,x+4,y+19) ;
  692.         Draw(Rp,x+4,y+3) ;
  693.         Draw(Rp,x+7,y) ;
  694.         Move(Rp,x,y+3) ;
  695.         Draw(Rp,x+4,y+3) ;
  696.         Move(Rp,x,y+23) ;
  697.         Draw(Rp,x+4,y+19) ;
  698.  
  699.     (* Schatten *)
  700.         Move(Rp,x+3,y+26) ;    Draw(Rp,x+d+7,y+26) ;
  701.         Move(Rp,x+4,y+25) ;   Draw(Rp,x+d+8,y+25) ;
  702.         Move(Rp,x+5,y+24) ;   Draw(Rp,x+d+9,y+24) ;
  703.         Move(Rp,x+6,y+23) ;   Draw(Rp,x+d+10,y+23) ; Draw(Rp,x+d+10,y+19) ;
  704.         Move(Rp,x+7,y+22) ;   Draw(Rp,x+d+9,y+22) ; Draw(Rp,x+d+9,y+20) ;
  705.         Move(Rp,x+7,y+21) ;
  706.  
  707.  
  708.         IF t >= 0 THEN
  709.            IF Length(Str[t]) = 2 THEN
  710.               Move(Rp,x+14,y+14) ;
  711.            ELSE
  712.               Move(Rp,x+10,y+14) ;
  713.            END ;
  714.            Text(Rp,ADR(Str[t]),Length(Str[t])) ;
  715.         END ;
  716.  
  717.     END DrawButton ;
  718.  
  719.  
  720.    BEGIN  (* HelpFenster *)
  721.  
  722.       IF NOT OpenWindow() THEN
  723.          RETURN FALSE
  724.       END ;
  725.  
  726.       SetAPen(Rp,1) ;
  727.       SetDrMd(Rp,GraphicsD.jam1) ;
  728.  
  729.       Move(Rp,600,0) ; Draw(Rp,0,0) ; Draw(Rp,0,450) ;
  730.       Move(Rp,590,10) ; Draw(Rp,190,10) ;
  731.       Move(Rp,0,0) ; Draw(Rp,10,10) ; Draw(Rp,10,290) ;
  732.       Move(Rp,0,300) ; Draw(Rp,10,310) ; Draw(Rp,10,440) ;
  733.       Move(Rp,590,310) ; Draw(Rp,10,310) ;
  734.  
  735.  
  736.       FOR i := 0 TO 10 DO
  737.          Move(Rp,i,300-i) ; Draw(Rp,600-i,300-i) ; Draw(Rp,600-i,i) ;
  738.       END ;
  739.  
  740.  
  741.       FOR i := 0 TO 10 DO
  742.          Move(Rp,i,450-i) ; Draw(Rp,600-i,450-i) ; Draw(Rp,600-i,300+i) ;
  743.       END ;
  744.  
  745.  
  746.       (* Ueberschrift *)
  747.  
  748.       x := 25 ; y := 0 ;
  749.       Move(Rp,x,y+44) ; Draw(Rp,x,y) ; Draw(Rp,x+165,y) ;
  750.       Move(Rp,x,y) ; Draw(Rp,x+7,y+7) ; Draw(Rp,x+158,y+7) ;
  751.       Move(Rp,x+7,y+37) ; Draw(Rp,x+7,y+7) ;
  752.  
  753.       (* Area *)
  754.  
  755.       FOR i := 0 TO 7 DO
  756.          Move(Rp,x+i,y+44-i) ; Draw(Rp,x+165-i,y+44-i) ; Draw(Rp,x+165-i,y+i) ;
  757.       END ;
  758.  
  759.       (* Area END *) ;
  760.  
  761.       Move(Rp,x,y) ; Draw(Rp,10,10) ;
  762.       Move(Rp,x,y+44) ; Draw(Rp,10,54) ; Draw(Rp,175,54) ; Draw(Rp,x+165,y+44) ;
  763.  
  764.       Move(Rp,26,44) ; Draw(Rp,189,44) ;
  765.       Move(Rp,24,45) ; Draw(Rp,187,45) ;
  766.       Move(Rp,23,46) ; Draw(Rp,186,46) ;
  767.       Move(Rp,21,47) ; Draw(Rp,184,47) ;
  768.       Move(Rp,20,48) ; Draw(Rp,183,48) ;
  769.       Move(Rp,19,49) ; Draw(Rp,182,49) ;
  770.       Move(Rp,17,50) ; Draw(Rp,180,50) ;
  771.       Move(Rp,15,51) ; Draw(Rp,178,51) ;
  772.       Move(Rp,14,52) ; Draw(Rp,177,52) ;
  773.       Move(Rp,12,53) ; Draw(Rp,175,53) ;
  774.       Move(Rp,11,54) ; Draw(Rp,174,54) ;
  775.  
  776.  
  777.       Str1[0] := 'Tastaturbelegung' ;
  778.       Move(Rp,x+19,y+25) ; Text(Rp,ADR(Str1[0]),Length(Str1[0])) ;
  779.  
  780.       Str[0] := 'ESC' ; Str[1] := 'F1' ; Str[2] := 'F2' ; Str[3] := 'F3' ;
  781.       Str[4] := 'F4'  ; Str[5] := 'F5' ; Str[6] := 'F6' ; Str[7] := 'F7' ;
  782.       Str[8] := 'F8'  ; Str[9] := 'F9' ; Str[10] := 'F10' ;
  783.  
  784.       Str1[0] := 'Quit' ; Str1[1] := 'Zoom in: Strecken in X,Y,Z';
  785.       Str1[2] := 'Strecken nur in X' ; Str1[3] := 'Strecken nur in Y' ;
  786.       Str1[4] := 'Strecken nur in Z' ; Str1[5] := '' ;
  787.  
  788.       DrawButton(25,60+50,0,TRUE) ;
  789.       Move(Rp,80,78+50) ;
  790.       Text(Rp,ADR(Str1[0]), Length(Str1[0])) ;
  791.  
  792.       FOR i := 0 TO 4 DO
  793.          DrawButton(25+i*55,250-i*24,i+1,TRUE) ; Move(Rp,80+i*55,268-i*24) ;
  794.          Text(Rp,ADR(Str1[i+1]), Length(Str1[i+1])) ;
  795.       END ;
  796.  
  797.       Str1[1] := 'Zoom out: Stauchen in X,Y,Z';
  798.       Str1[2] := 'Stauchen nur in X' ; Str1[3] := '' ;
  799.       Str1[4] := '' ; Str1[5] := '' ;
  800.       FOR i := 0 TO 4 DO
  801.          DrawButton(315+i*55,120-i*24,i+6,TRUE) ; Move(Rp,370+i*55,138-i*24) ;
  802.          Text(Rp,ADR(Str1[i+1]), Length(Str1[i+1])) ;
  803.       END ;
  804.  
  805.       Str1[0] := 'Stauchen nur in Y' ;
  806.       Move(Rp,276,88) ;  Text(Rp,ADR(Str1[0]), Length(Str1[0])) ;
  807.       Str1[0] := 'Stauchen nur in Z' ;
  808.       Move(Rp,331,64) ;  Text(Rp,ADR(Str1[0]), Length(Str1[0])) ;
  809.       Str1[0] := 'Anfangseinstellung' ;
  810.       Move(Rp,378,40) ;  Text(Rp,ADR(Str1[0]), Length(Str1[0])) ;
  811.  
  812.  
  813.       (* Kreuz, CursorTasten *)
  814.  
  815.       Str1[0] := 'Scrolling:' ;
  816.       Move(Rp,40,322) ; Text(Rp,ADR(Str1[0]),Length(Str1[0])) ;
  817.  
  818.       x := 55 ; y := 355 ;
  819.       Move(Rp,x+20,y+40) ; Draw(Rp,x+20,y) ;
  820.       Move(Rp,x+18,y+2) ; Draw(Rp,x+20,y) ; Draw(Rp,x+22,y+2) ;
  821.  
  822.       Move(Rp,x,y+20) ; Draw(Rp,x+40,y+20) ;
  823.       Move(Rp,x+39,y+19) ; Draw(Rp,x+40,y+20) ;Draw(Rp,x+35,y+21) ;
  824.  
  825.       Move(Rp,x,y+30) ; Draw(Rp,x+40,y+10) ;
  826.       Move(Rp,x,y+29) ; Draw(Rp,x,y+30) ; Draw(Rp,x+4,y+29) ;
  827.  
  828.       Str[0] := 'x' ; Str[1] := 'y' ; Str[2] := 'z' ;
  829.       Move(Rp,x+24,y+4) ; Text(Rp,ADR(Str[2]),Length(Str[0])) ;
  830.       Move(Rp,x+42,y+24); Text(Rp,ADR(Str[0]),Length(Str[1])) ;
  831.       Move(Rp,x+5,y+36) ; Text(Rp,ADR(Str[1]),Length(Str[2])) ;
  832.  
  833.       Str1[0] := 'Cursortasten' ;
  834.       Move(Rp,155,322) ; Text(Rp,ADR(Str1[0]),Length(Str1[0])) ;
  835.  
  836.  
  837.       x := 190 ; y := 335 ;
  838.  
  839.       Str[0] := 'Y' ; Str[1] := 'X' ;
  840.  
  841.       DrawButton(x,y,0,FALSE) ;
  842.       DrawButton(x,y+60,0,FALSE) ;
  843.       DrawButton(x-15,y+30,1,FALSE) ;
  844.       DrawButton(x+15,y+30,1,FALSE) ;
  845.  
  846.  
  847.       (* Zahlenblock *)
  848.  
  849.       Str1[0] := 'Zahlenblock' ;
  850.       Move(Rp,279,322) ; Text(Rp,ADR(Str1[0]),Length(Str1[0])) ;
  851.  
  852.  
  853.       Str[1] := '' ; Str[2] := 'Z' ; Str[3] := '' ;
  854.       Str[4] := 'X' ; Str[5] := '' ; Str[6] := 'X' ;
  855.       Str[7] := '' ; Str[8] := 'Z' ; Str[9] := '' ;
  856.  
  857.       x := 250 ; y := 332 ;
  858.  
  859.       FOR i := 0 TO 2 DO
  860.          FOR j := 1 TO 3 DO
  861.             DrawButton(x+j*30,y+i*30,i*3+j,FALSE) ;
  862.          END ;
  863.       END ;
  864.  
  865.  
  866.  
  867.       LOOP
  868.          ExecL.WaitPort(Window2Ptr^.userPort) ;
  869.          IntuiMsg := ExecL.GetMsg(Window2Ptr^.userPort) ;
  870.          IF IntuiMsg # NIL THEN
  871.             class := IntuiMsg^.class ;
  872.             code  := IntuiMsg^.code ;
  873.             ExecL.ReplyMsg(IntuiMsg) ;
  874.             IF (IntuitionD.rawKey IN class) THEN
  875.                IF code = 223 THEN
  876.                   code := WelcheTaste(code) ;
  877.                   EXIT ;
  878.                END ;
  879.             END ;
  880.          END (* IF *) ;
  881.       END (* LOOP *) ;
  882.  
  883.       IF Window2Ptr # NIL THEN
  884.          IntuitionL.CloseWindow(Window2Ptr) ;
  885.       END ;
  886.  
  887.       RETURN TRUE ;
  888.  
  889.  
  890.    END HelpFenster ;
  891.  
  892.  
  893. END PlotZeichnen.
  894.  
  895.  
  896.